<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<link rel="stylesheet" type="text/css" href="../../../Themes/default/easyui.css">
		<link rel="stylesheet" type="text/css" href="../../../Themes/icon.css">
		<link rel="stylesheet" type="text/css" href="../../../CSS/demo.css">
		<link rel="stylesheet" type="text/css" href="../../../CSS/common.css">
		<link rel="stylesheet" type="text/css" href="../../../CSS/print.css">
		<script type="text/javascript" src="../../../JS/jquery.min.js"></script>
		<script type="text/javascript" src="../../../JS/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="../../../JS/common.js"></script>
		<script type="text/javascript" src="../../../JS/SHA-1.js"></script>
		<script type="text/javascript" src="../../../JS/finance.js"></script>
	</head>

	<body>
		<div class="div_print_info_portait">
			<h1 align="center">绵阳市高水农副产品批发有限公司配送中心</h1>
			<h1 align="center">食品安全事件</h1>
			<form id="ff" method="post" style="width:95%">
				<table cellspacing="4" style="margin-top: 10px;margin-left: 0px;margin-bottom: 10px;">
					<tr>
						<th>事件编号</th>
						<td>
							<input type="text" name="ORDER_NO" class="print_text_style" />
						</td>
					</tr>
				</table>
				<table class="altrowstable printtable" style="text-align: left;">
					<tr>
						<th width="15%">事件发生时间</th>
						<td width="35%">
							<input style="width: 100%;" type="text" name="TIME" class="print_text_style" />
						</td>
						<th width="15%">是否整改</th>
						<td width="35%">
							<input style="width: 100%" type="text" name="ISRECTIFICATION" id="input_ISRECTIFICATION" class="print_text_style" />
						</td>
					</tr>
				</table>
				<table cellpadding="5" class="altrowstable printtable" style="margin-top: 0px;">
					<tr>
						<td>安全事件：</td>
					</tr>
				</table>
				<table id="OrderInforTableOne" class="altrowstable printtable" style="margin-top: 0px;text-align: center;">
					<tr>
						<th>
							<div name="NAME">租户人员</div>
						</th>
						<th>
							<div name="TYPE">类型</div>
						</th>
						<th>
							<div name="GENDER">性别</div>
						</th>
						<th>
							<div name="IDCARD">身份证</div>
						</th>
						<th>
							<div name="TELEPHONE">电话号码</div>
						</th>
					</tr>
				</table>
				<table cellpadding="5" class="altrowstable printtable" style="margin-top: 0px;">
					<tr>
						<td>整改事件：</td>
					</tr>
				</table>
				<table id="OrderInforTableTwo" class="altrowstable printtable" style="margin-top: 0px;text-align: center;">
					<tr>
						<th>
							<div name="RECTIFICATION_TIME">整改事件</div>
						</th>
						<th>
							<div name="DESCRIPTION">整改说明</div>
						</th>
						<th>
							<div name="AGENT">经办人</div>
						</th>
						<th>
							<div name="MEMO">备注</div>
						</th>
					</tr>
				</table>
				<div>
					<div style="float: left;margin-left: 10px;"> 负责人： <span> </span></div>
					<div style="position: absolute;left:500px;"> <span> </span></div>
				</div>
			</form>
		</div>
	</body>
	<script type="text/javascript">
		var id = getID();
		$(document).ready(function(){
			loadRemote();
		});

		function loadRemote() {
			$.ajax({
				type: "get",
				url: RemoteLinkAddress + '/market/security/findbyid.do?ID=' + id,
				dataType: "json",
				success: function(result) {
					$('#ff').form('load', result);
					if($("input[name='ISRECTIFICATION']").val() == 0) {
						$("input[name='ISRECTIFICATION']").val("否");
					} else {
						$("input[name='ISRECTIFICATION']").val("是");
					}
					var newTd = new Array();
					var _data = result.rows_man;
					for(var i = 0; i < _data.length; i++) {
						var newTr = OrderInforTableOne.insertRow();
						newTd[0] = newTr.insertCell()
						if(_data[i].NAME != undefined)
							newTd[0].innerText = _data[i].NAME;

						newTd[1] = newTr.insertCell();
						if(_data[i].TYPE != undefined && _data[i].TYPE == 0) {
							newTd[1].innerText = "租户";
						} else {
							newTd[1].innerText = "小商户";
						}

						newTd[2] = newTr.insertCell();
						if(_data[i].GENDER != undefined)
							newTd[2].innerText = _data[i].GENDER;

						newTd[3] = newTr.insertCell();
						if(_data[i].IDCARD != undefined)
							newTd[3].innerText = _data[i].IDCARD;

						newTd[4] = newTr.insertCell();
						if(_data[i].TELEPHONE != undefined)
							newTd[4].innerText = _data[i].TELEPHONE;
					}

					var data = result.rows_manage;
					for(var i = 0; i < data.length; i++) {
						var newTr = OrderInforTableTwo.insertRow();
						newTd[0] = newTr.insertCell()
						if(data[i].RECTIFICATION_TIME != undefined)
							newTd[0].innerText = data[i].RECTIFICATION_TIME;

						newTd[1] = newTr.insertCell();
						if(data[i].DESCRIPTION != undefined)
							newTd[1].innerText = data[i].DESCRIPTION;

						newTd[2] = newTr.insertCell();
						if(data[i].AGENT != undefined)
							newTd[2].innerText = data[i].AGENT;

						newTd[3] = newTr.insertCell();
						if(data[i].MEMO != undefined)
							newTd[3].innerText = data[i].MEMO;
					}
				}
			});
		}
	</script>

</html>